Skip to content

feat(nuxt): Add _experimental.useDiagnosticsChannelInjection#22323

Merged
s1gr1d merged 7 commits into
developfrom
sig/orchestrion-nuxt
Jul 17, 2026
Merged

feat(nuxt): Add _experimental.useDiagnosticsChannelInjection#22323
s1gr1d merged 7 commits into
developfrom
sig/orchestrion-nuxt

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Jul 16, 2026

Copy link
Copy Markdown
Member

Adds the useDiagnosticsChannelInjection option and updates the E2E test.

When using _experimental.useDiagnosticsChannelInjection, users also need to do those steps:

  1. Call Sentry.experimentalUseDiagnosticsChannelInjection() just before Sentry.init()
  2. Remove --import ./.output/server/sentry.server.config.mjs from your startscript
  3. Add sentry.autoInjectServerSentry: 'top-level-import' in nuxt.config.ts so Sentry's server configuration is automatically imported

closes #22348

@s1gr1d
s1gr1d requested a review from a team as a code owner July 16, 2026 11:58
@s1gr1d
s1gr1d requested review from JPeer264, chargome, mydea and nicohrubec and removed request for a team July 16, 2026 11:58
Comment thread packages/nuxt/package.json Outdated
s1gr1d added 2 commits July 17, 2026 09:36
# Conflicts:
#	dev-packages/e2e-tests/test-applications/nuxt-4-orchestrion/package.json

@chargome chargome left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment thread packages/nuxt/package.json Outdated

// ioredis requires this CommonJS helper to be bundled with it. Leaving it
// external makes Nitro resolve the default export as a namespace object.
const IORedisDependencies = ['standard-as-callback'];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: This will likely fail for all nitro based frameworks I guess? Maybe we can move this to server utils at some point so we can make this reusable if we run into more of these things.

Comment thread packages/nuxt/src/module.ts Outdated
const nuxtMajor = parseInt((nuxt as unknown as { _version: string })._version?.split('.')[0] ?? '3', 10);
const isMinNuxtV4 = nuxtMajor >= 4;

if (serverConfigFile && moduleOptions._experimental?.useDiagnosticsChannelInjection) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This check could be moved to the block below.

_experimental: {
useDiagnosticsChannelInjection: true,
},
autoInjectServerSentry: 'top-level-import',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: Is the plan to make this the default then?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes 👍

@JPeer264 JPeer264 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. + charlies additions.

Tests are failing, but I guess after a rebase these should pass.

Comment thread packages/nuxt/src/vite/orchestrion.ts Outdated
return;
}

if (!nitroConfig.rollupConfig) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-l: That is one of the view moments while engineering where the following could be used (I always wanted to use it, but almost never had the chance) - you also have it later in the code:

nitroConfig.rollupConfig ??= {}

/**
* Experimental build-time options that may change or be removed without notice.
*/
_experimental?: {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q: this will go away again in v11?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.74 kB - -
@sentry/browser - with treeshaking flags 26.18 kB - -
@sentry/browser (incl. Tracing) 46.55 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.35 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.36 kB - -
@sentry/browser (incl. Tracing, Replay) 85.81 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.46 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.52 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.2 kB - -
@sentry/browser (incl. Feedback) 44.93 kB - -
@sentry/browser (incl. sendFeedback) 32.54 kB - -
@sentry/browser (incl. FeedbackAsync) 37.68 kB - -
@sentry/browser (incl. Metrics) 28.83 kB - -
@sentry/browser (incl. Logs) 29.06 kB - -
@sentry/browser (incl. Metrics & Logs) 29.75 kB - -
@sentry/react 29.54 kB - -
@sentry/react (incl. Tracing) 48.81 kB - -
@sentry/vue 33.17 kB - -
@sentry/vue (incl. Tracing) 48.51 kB - -
@sentry/svelte 27.77 kB - -
CDN Bundle 30.14 kB - -
CDN Bundle (incl. Tracing) 48.52 kB - -
CDN Bundle (incl. Logs, Metrics) 31.73 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.82 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.97 kB - -
CDN Bundle (incl. Tracing, Replay) 86.03 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.83 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.09 kB - -
CDN Bundle - uncompressed 89.87 kB - -
CDN Bundle (incl. Tracing) - uncompressed 146.68 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.58 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.66 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.32 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 265.89 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.6 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.55 kB - -
@sentry/nextjs (client) 51.36 kB - -
@sentry/sveltekit (client) 46.98 kB - -
@sentry/core/server 78.69 kB - -
@sentry/core/browser 65.06 kB - -
@sentry/node-core 63.21 kB - -
@sentry/node 125.52 kB +0.01% +1 B 🔺
@sentry/node (incl. diagnostics channel injection) 148.06 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB +0.01% +2 B 🔺
@sentry/node/light 51.31 kB -0.01% -2 B 🔽
@sentry/node - without tracing 74.71 kB -0.01% -1 B 🔽
@sentry/aws-serverless 83.92 kB - -
@sentry/cloudflare (withSentry) - minified 183.93 kB - -
@sentry/cloudflare (withSentry) 455.29 kB - -

View base workflow run

@s1gr1d
s1gr1d enabled auto-merge (squash) July 17, 2026 12:51
@s1gr1d
s1gr1d merged commit 465229c into develop Jul 17, 2026
89 of 91 checks passed
@s1gr1d
s1gr1d deleted the sig/orchestrion-nuxt branch July 17, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add orchestrion option in Nuxt

4 participants